<?php

/**
 * @author honestphan
 * @copyright 2012
 */
//G?i t?p tin giao di?n trong thu m?c view/theme/template tuong ?ng

defined('DSVH') or die('Restricted access');
include('model/m_home.php');
include('controller/c_thongke.php');
include('controller/c_block.php');
include('model/m_thietkeweb.php');
include('model/m_domain.php');
include('model/m_hosting.php');

   	   $page = $_GET['act'];
        switch($page){
            
        case'thietkeweb':
        include('language/dichvu/lang_thietkeweb.php');
        //lấy danh sach bang tin
    
        $title = home;
    	$heading_title=home;
        $txt_dichvukhac = dich_vu_khac;
        
        $tkw_detail = getthietkeweb(0);
        $relate_gtc = getListthietkewebtheoloai(1,0,10);
        $cacgoiweb = getListthietkewebtheoloai(2,0,100);
        $list_dvdk = getListthietkewebtheoloai(3,0,5);
         
    	require('view/theme/default/template/home/header.tpl'); 
    	require('view/theme/default/template/home/left.tpl'); 
    	require('view/theme/default/template/dichvu/list_thietkeweb.tpl');
    	require('view/theme/default/template/home/footer.tpl');    
        break; 
            
        case'vthietkeweb':
        include('language/dichvu/lang_thietkeweb.php');
        //lấy danh sach bang tin
    
        $title = home;
    	$heading_title=home;
        $txt_dichvukhac = dich_vu_khac;
        $id = $_REQUEST['id'];
        $tkw_detail = getthietkeweb($id);
        $relate_gtc = getListthietkewebtheoloai(1,0,10);
        $cacgoiweb = getListthietkewebtheoloai(2,0,100);
        
        $keyword = $tkw_detail['keyword'];
        $description = $tkw_detail['general'];
        
    	require('view/theme/default/template/home/header.tpl'); 
    	require('view/theme/default/template/home/left.tpl'); 
    	require('view/theme/default/template/dichvu/list_vthietkeweb.tpl');
    	require('view/theme/default/template/home/footer.tpl');    
        break; 
            
        case'gthietkeweb':
        include('language/dichvu/lang_thietkeweb.php');
        //lấy danh sach bang tin
    
        $title = home;
    	$heading_title=home;
        $txt_dichvukhac = dich_vu_khac;
        $id = $_REQUEST['id'];
        
        $tkw_detail = getthietkeweb($id);
       
       
        $cacgoiweb = getListthietkewebtheoloai(2,0,100);
       
        $keyword = $tkw_detail['keyword'];
        $description = $tkw_detail['general'];
    	require('view/theme/default/template/home/header.tpl'); 
    	require('view/theme/default/template/home/left.tpl'); 
    	require('view/theme/default/template/dichvu/list_gthietkeweb.tpl');
    	require('view/theme/default/template/home/footer.tpl');    
        break; 
        
        case'kthietkeweb':
        include('language/dichvu/lang_thietkeweb.php');
        //lấy danh sach bang tin
    
        $title = home;
    	$heading_title=home;
        $txt_dichvukhac = dich_vu_khac;
        $id = $_REQUEST['id'];
        
        $tkw_detail = getthietkeweb($id);
        $relate_gtc = getListthietkewebtheoloai(3,0,10);
         $cacgoiweb = getListthietkewebtheoloai(2,0,100);
        $keyword = $tkw_detail['keyword'];
        $description = $tkw_detail['general'];
    	require('view/theme/default/template/home/header.tpl'); 
    	require('view/theme/default/template/home/left.tpl'); 
    	require('view/theme/default/template/dichvu/list_kthietkeweb.tpl');
    	require('view/theme/default/template/home/footer.tpl');    
        break; 
        
        
        case'domain':
        include('language/dichvu/lang_domain.php');
        //lấy danh sach bang tin
    
        $title = home;
    	$heading_title=home;
        $txt_dichvukhac = dich_vu_khac;
        
        $id = $_REQUEST['id'];
        
       
        $type = $_REQUEST['type'];
        if($type =='qt'){
        $list_domain = getListdomaintheothamso(1,1,0,1);
        }
        if($type =='vn'){
        $list_domain = getListdomaintheothamso(3,1,0,1);    
        }
        
        $list_kttm = getListdomaintheothamso(2,0,0,20);    
        
    	require('view/theme/default/template/home/header.tpl'); 
    	require('view/theme/default/template/home/left.tpl'); 
    	require('view/theme/default/template/dichvu/list_domain.tpl');
    	require('view/theme/default/template/home/footer.tpl');    
        break; 
        
        case'ktdomain':
        include('language/dichvu/lang_domain.php');
        //lấy danh sach bang tin
    
        $title = home;
    	$heading_title=home;
        $txt_dichvukhac = dich_vu_khac;
        
        $id = $_REQUEST['id'];
        if($_REQUEST['id']==''){
            $id =4;
        }
        $item = getdomain($id);
        
        $list_kttm = getListdomaintheothamso(2,0,0,20);    
        
    	require('view/theme/default/template/home/header.tpl'); 
    	require('view/theme/default/template/home/left.tpl'); 
    	require('view/theme/default/template/dichvu/list_ktdomain.tpl');
    	require('view/theme/default/template/home/footer.tpl');    
        break; 
      
        case'hosting':
        include('language/dichvu/lang_hosting.php');
        //lấy danh sach bang tin
    
        $title = home;
    	
        $heading_title=home;
        
      
        
        //$id = $_REQUEST['id'];
        
        $type = $_REQUEST['type'];
        if($type =='windows'){
              $hosting_detail = gethosting(2);
        }
        if($type =='linux'){
        $hosting_detail = gethosting(1);
        }
        
        if($type=='tou'){
        $hosting_detail = gethosting(3);
        }
        
    	require('view/theme/default/template/home/header.tpl'); 
    	require('view/theme/default/template/home/left.tpl'); 
    	require('view/theme/default/template/dichvu/list_hosting.tpl');
    	require('view/theme/default/template/home/footer.tpl');    
        break; 
        
        case 'checkdomain':
        include('language/dichvu/lang_domain.php');
        require_once("./system/AjaxWhois.php"); 
        $whois = new AjaxWhois();
        $list_lkw = getListlienketweb(0,10);
        $list_kttm = getListdomaintheothamso(2,0,0,20);    
        $title = kttm;  
    	require('view/theme/default/template/home/header.tpl'); 
    	require('view/theme/default/template/home/left.tpl'); 
    	require('view/theme/default/template/dichvu/check_domain.tpl');
    	require('view/theme/default/template/home/footer.tpl');  
        break;
        
        case 'whois':
        include('language/dichvu/lang_domain.php');
        require_once("./system/AjaxWhois.php"); 
	$whois = new AjaxWhois();
	?>
	<?php 
	$domainName = (isset($_POST['domain'])) ? $_POST['domain'] : '';
	
	if ($domainName) {
		$whois->processAjaxWhois(); 
	} else {
		echo '<h2 class="red">'.canhbao.'</h2>';
	}
      
        break;
      
      
      
        }

?>